package unit4_1013.test2;

public class Student {
	
	private int id;
	private String name;
	private int age;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public Student(int id, String name, int age) {
		this.id = id;
		this.name = name;
		this.age = age;
	}
	public Student() {
	}
	
	@Override
	public boolean equals(Object obj) {		
		Student other=(Student)obj;//强制类型转换		
		if(this.id==other.id && this.name==other.name) {
			return true;
		}
		return false;
	}
	
	
}
